<%--
  Created by IntelliJ IDEA.
  User: Berlin-IOU
  Date: 2017/12/5
  Time: 21:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<html>
<head>
    <title>添加用户</title>
    <link type="text/css" href="${pageContext.request.contextPath}/assets/lib/css/bootstrap.min.css" rel="stylesheet">
    <link type="text/css" href="${pageContext.request.contextPath}/assets/lib/css/bootstrap.css" rel="stylesheet">
    <link type="text/css" href="${pageContext.request.contextPath}/assets/lib/css/bootstrap-datepicker.min.css"
          rel="stylesheet">
</head>
<body>

<div class="container" style="margin-top: 50px">
    <form:form cssClass="form-horizontal" modelAttribute="USER">
        <div class="form-group">
            <label for="name" class="col-sm-2 control-label">名字</label>
            <div class="col-sm-4">
                <form:input cssClass="form-control" path="name" placeholder="请输入名字"/>
            </div>
            <div class="col-sm-4">
                <form:errors  path="name" cssClass="text-danger"/>
            </div>
        </div>

        <div class="form-group">
            <label for="gender" class="col-sm-2 control-label">性别</label>
            <div class="col-sm-4">
                <form:radiobuttons path="gender" delimiter="&nbsp;&nbsp;&nbsp;" items="${GENDER}" itemLabel="text"/>
            </div>
            <div class="col-sm-4">
                <form:errors path="gender"   cssClass="text-danger"/>
            </div>
        </div>

        <div class="form-group">
            <label for="birthday" class="col-sm-2 control-label">出生日期</label>
            <div class="col-sm-4">
                <form:input path="birthday" cssClass="form-control birthday" placeholder="请选择出生日期"/>
            </div>
            <div class="col-sm-4">
                <form:errors path="birthday"   cssClass="text-danger"/>
            </div>
        </div>
        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
                <button type="submit" class="btn btn-default btn-success">添加</button>
            </div>
        </div>
        </form:form>
        <script type="application/javascript"
                src="${pageContext.request.contextPath}/assets/lib/js/jquery-3.2.1.min.js"></script>
        <script type="application/javascript"
                src="${pageContext.request.contextPath}/assets/lib/js/bootstrap.min.js"></script>
        <script type="application/javascript"
                src="${pageContext.request.contextPath}/assets/lib/js/bootstrap-datepicker.js"></script>
        <script type="application/javascript"
                src="${pageContext.request.contextPath}/assets/lib/js/bootstrap-datepicker.min.js"></script>
        <script type="application/javascript"
                src="${pageContext.request.contextPath}/assets/lib/js/bootstrap-datepicker.zh-CN.min.js"></script>
        <script type="application/javascript" src="${pageContext.request.contextPath}/assets/app/js/user.js"></script>
</div>
</body>
</html>
